<link rel="stylesheet" href="css/aliceui.min.css"/>
<link rel="stylesheet" href="css/resetui.css"/>
<link rel="stylesheet" href="css/reg.css"/>
<script type="text/javascript" src="js/jquery-1.8.0.min.js"></script>
<style type="text/css">
    #create_new_lnk{display: none;}
    .message{border: 1px solid #0088cc;}#t {
width: 324px;
margin: 5px auto;
padding:0px;
border-top: #ccc 1px solid;
border-left: #ccc 1px solid;
display:table;
}
#t li {
float: left;
width: 80px;
height: 50px;
list-style-type: none;
border-right:#ccc 1px solid;
border-bottom: #ccc 1px solid;
text-align: center;
line-height: 50px;
}

fieldset{width:807px;height:360px; border: 1px solid #E1E1E1;}
legend{margin-left:15px;font-weight:bold; font-size:14px;color:#121212;}




a { text-decoration:none; color:#000;}
li { list-style:none;}
.center { margin:0 auto; width:800px;}
.title { width:780px; height:50px;  margin-top:-25px; line-height:30px; text-align:right; padding-right:15px;}
.nav { width:800px; height:380px; margin-top:15px; overflow:hidden;}
.nav ul li { width:800px; float:left; height:180px;}
.nav ul li ul li{ width:153px; float:left; height:100px; border:1px solid #E1E1E1; margin-left:5px;margin:6px 0 0 6px;}
.nav ul li ul li.first { margin-left:0;}
.red{color:red;}
td {
 text-align: left;

} 
</style>
<script type="text/javascript">document.title="添加分销商 - <?=$data['web_title']?>";</script>
<!--主体-->
<div class="r_content" id="register">
    <h3 class="mc_title">
        <span class="mctit_1">
		<a href="javascript:void(0);"><span class="mctit_2">添加分销商</span></a>
		</span>
<!--
		<span class="mctit_1 notcur">
		<a href="javascript:void(0);" class="famous"><span class="mctit_2">知名分销商</span></a>
		</span>
-->
    </h3>
    <div class="ui-tiptext-container ui-tiptext-container-question mt10">
        <p class="ui-tiptext ui-tiptext-warning">
            <span class="ui-form-required">+</span>添加成功后请点击“价格配置”为分销商配置结算价。
        </p>
    </div>
	<div class="tab_wrap tab_show">
    <form id="reg_form" class="reg_form">
        <?=$data['csrf_token'];?>
        <input type="hidden" name="action" value="RelationshipCreate"/>
        <input type="hidden" name="actionType" value="CreateDistor"/>
        <input type="hidden" name="dtype" value="1"/>
        <table class="add_table" style="margin-left: 12px;">
            <tbody>
            <tr>
                <td class="tab1"><span class="ui-form-required">*</span>分销商名称</td>
                <td class="tab2">
                    <input type="text" id="dname_e" class="ui-input" name="company" />
                </td>
                <td class="tab3" width="50px">
                    <p class="normal">输入分销商名称，仅限中文</p>
                    <p class="error"></p>
                    <p class="ok">&nbsp;</p>
               </td>

				<td class="tab1"><span class="ui-form-required">*</span>密码</td>
                <td class="tab2">
                <input type="password" data-msg="密码不能为空" class="ui-input required" name="password" />
                </td>
                <td class="tab3" width="80px">
                    <p class="normal">6-16个字符,请使用字母加数字或符号</p>
                    <p class="error"></p>
                    <p class="ok">&nbsp;</p>
                </td>
			</tr>
            <tr>
                <td class="tab1"><span class="ui-form-required">*</span>姓名</td>
                <td>
                    <input type="text" id="dname_c" data-msg="请输入分销商真实姓名" class="ui-input required" name="username" />
                </td>
                <td class="tab3" width="100px">
                    <p class="normal">请输入联系人姓名，仅限中文</p>
                    <p class="error"></p>
                    <p class="ok">&nbsp;</p>
                </td>
            
				<td class="tab1"><span class="ui-form-required">*</span>确认密码</td>
                <td class="tab2">
                    <input type="password" class="ui-input required" name="confirmPwd" />
                </td>
                <td class="tab3" width="80px">
                    <p class="normal">请再次输入密码</p>
                    <p class="error"></p>
                    <p class="ok">&nbsp;</p>
                </td>
			</tr>
			
			
            <tr>
				<td class="tab1"><span class="ui-form-required">*</span> 手机号</td>
                <td class="tab2">
                    <input type="text" class="ui-input" name="mobile" id="mobile_c" />
                </td>
                <td class="tab3" width="100px">
                    <p class="normal">请输入分销商手机号</p>
                    <p class="error"></p>
                    <p class="ok1">&nbsp;</p>
                </td>
				
				<td class="tab1">企业类型</td>
                <td class="tab2">
                    <select name="com_type" class="dtlist">
                    <option value="加盟门店">加盟门店</option>
                    <option value="电商/团购网">电商/团购网</option>
                    <option value="旅行社">旅行社</option>
                    <option value="淘宝/天猫">淘宝/天猫</option>
                    <option value="其他">其他</option>
					</select>
				</td>
            </tr>
          
            <tr>
                <td>&nbsp;</td>
				<td>&nbsp;</td>
                <td colspan="2">
                    <input type="button" id="distor_btn_c" value="" class="submit_btn_d"/>
                </td>
            </tr>
            </tbody>
       </table>
    </form>
	<table id="selected_distor" >
		<thead>
		<tr>
			<th class="first">分销商名称</th>
			<th>公司类型</th>
			<th>联系人</th>
			<th>操作</th>
		</tr>
		</thead>
		<tbody id="selected_distor_list" class="hide">
		<tr id="dist_{$id}">
			<td class="first" style="text-align:left">[{$account}]{$dname}</td>
			<td style="text-align:left">{$com_type}</td>
			<td style="text-align:left">{$cname}[{$mobile}]</td>
			<td style="text-align:left">{$btn}</td>
		</tr>
		</tbody>
		<tbody id="selected_show_list">

		</tbody>
	</table>
	</div>
	</div>	
<div class="huanyihuan">
<fieldset>
<legend>快速添加分销商</legend>
<div class="center">
  <div class="title">
	<a href="###" onclick="next();"><img SRC="../images/fenxiaoshang/huanyihuan.png" /></img></a>
  </div>
  <div class="nav">
    <ul id='list'>
      <li id='l1' >
    <table width="798" height="119"  align="center">
  <tr>
     <td width="130" height="68" align="left" valign="middle"><img src="../images/fenxiaoshang/xianxing.png" /></td>
    <td width="5">&nbsp;</td>
   <td width="130" border-color:#616161; border-width:1px; border-style:solid; height="68" align="left" valign="middle"><img src="../images/fenxiaoshang/xiecheng.png" /></td>
    <td width="5">&nbsp;</td>
	<td width="130" height="68" align="left" valign="middle"><img src="../images/fenxiaoshang/lvmama.png" /></td>
    <td width="5">&nbsp;</td>
 <td width="130" height="68" align="left" valign="middle"><img src="../images/fenxiaoshang/tongcheng.png" /></td>
 <td width="5">&nbsp;</td>
 <td width="130" height="68" align="left" valign="middle"><img src="../images/fenxiaoshang/lashou.png" /></td>
  
  </tr>
  <tr>
    <td border="1"><input type="checkbox" value="先行旅游" class="famous"/>
    旅游同业分销平台</td>
    <td>&nbsp;</td>
   <td><input type="checkbox" value="携程网" class="famous"/>
    携程网</td>
    <td>&nbsp;</td>
	 <td><input type="checkbox" value="驴妈妈" class="famous"/>
    驴妈妈</td>
    <td>&nbsp;</td>
   <td><input type="checkbox" value="同程网" class="famous"/>
   同程网</td>
   <td>&nbsp;</td>
   <td><input type="checkbox" value="拉手网" class="famous"/>
    拉手网</td>
  </tr>

<table width="798" height="119"  align="center">
	<tr>
		<td width="147" height="68" align="left" valign="middle"><img src="../images/fenxiaoshang/meituan.jpg" /></td>
		<td width="5">&nbsp;</td>
		<td width="147" height="68" align="left" valign="middle"><img src="../images/fenxiaoshang/qunaer.jpg" /></td>
	</tr>
	<tr>
		<td border="1"><input type="checkbox" value="【美团】北京三快在线科技有限公司" class="famous"/>
		美团网</td>
		<td>&nbsp;</td>
		<td><input type="checkbox" value="去哪儿" class="famous"/>
		去哪儿</td>
		<td>&nbsp;</td>
	</tr>
</table>
    </li>    
</div>
</fieldset>
<div class="red">注：添加配置OTA、团购为分销商后，需联系OTA、团购业务上架销售。</div>
</div>
	


</div>
<!--<script type="text/javascript" src="js/jquery.getareas.js"></script>-->
<!--    <script type="text/javascript" src="js/easydialog.min.js"></script>-->
<script type="text/javascript" src="js/fun.inc.dt.js"></script>
<script type="text/javascript" src="js/prod_pub.js"></script>
<script type="text/javascript" src="js/reg_c.js"></script>
<script type="text/javascript">
jQuery(document).ready(function($){


	
	$("#selected_distor").on('click', 'a.selected_distor_add', function(){
		var did = $(this).attr('data-id'),
		param = {
			action: 'AddRelationShip',
			distor: did,
			token : reg.getToken()
		},
		elem = $(this);
		$.post(reg.request_url,param,function(json_res){
			if(json_res.status=='ok') {
				elem.parent('td').html('已添加|<a target="_blank" href="priceset.html?did='+did+'">价格配置</a>');
			} else {
				alert(json_res.msg);
			}
		},'json');
	});
});
function next () {
	var i=1;count=1;
	for (var j=1; j<=count; j++) {
		i==j ? $('#l'+j).show():$('#l'+j).hide();
	}
	i=i<count ? i+1:1;
}
</script>